import {request} from '../utils/util'

export function loginByUsername(param) {
  return request({
    url: 'ecapi.auth.signin',
    method: 'POST',
    data: param
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}
export function loginNumber() {
  return request({
    url: '/jcaptcha',
    method: 'get'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}
export function loginRecord(query) {
  return request({
    url: '/record/loginRecord',
    method: 'post',
    params: query
  })
}
export function recordDetail(query) {
  return request({
    url: '/record/recordDetail',
    method: 'post',
    params: query
  })
}

